#!/usr/bin/env node 
const http = require("http"),
      qs=require('querystring'),
      fs=require('fs');
http.createServer((req, res)=>{
/* let data='';
 req.on('data',(chunck)=>data+=chunck);
 req.on('end',()=>{
  console.log( qs.parse(data));
   res.end('ok')
 })*/
  if(req.url==='/'){
    if(req.method==='POST'){
       let data='';
       req.on('data',(chunck)=>data+=chunck);
       req.on('end',()=>{
         console.log( qs.parse(data));
          }
          }else if(req.method==='GET'){
            const html=fs.readFileSync('./04-form.html')toString('utf8');
          }
 }).listen(3000);
